package appdemo;


/**
 * appdemo.AppBootstrap
 *
 * @author cyril
 * @date 2022/3/8 09:56 下午
 * <p>
 * 日进一寸 日拱一卒
 */
public class AppBootstrap {

    public static void main(String[] args) throws InterruptedException {
        // java -javaagent:../../simple-premain-agent/target/simple-premain-agent-1.0-SNAPSHOT.jar='hello world' -jar app-demo-1.0-SNAPSHOT.jar
        // java -javaagent:../../method-time-monitor-agent/target/method-time-monitor-agent-1.0-SNAPSHOT-jar-with-dependencies.jar='hello world' -jar app-demo-1.0-SNAPSHOT.jar

        System.out.println("应用启动成功");
        BusinessService businessService = new BusinessService();
        for (int i = 0; i < 1000; i++) {
            System.out.println("应用还在运行： " + i);
            businessService.doSth1();
            businessService.doSth2();

//            Thread.sleep(5000);
        }
    }

}
